package com.example.takeaway.converter;

import com.example.takeaway.model.bo.Specification;
import com.example.takeaway.model.dto.SpecificationDTO;
import com.example.takeaway.model.dto.SpecificationEditorDTO;
import com.example.takeaway.model.vo.SpecificationVO;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * @author 邢晨旭
 * {@code @date} 2023/10/15
 */
@Mapper(componentModel = "spring")
public interface SpecificationConverter {

    /**
     * dto转bo
     *
     * @param dto dto
     * @return bo
     */
    Specification toSpecification(SpecificationDTO dto);

    Specification toSpecification(SpecificationEditorDTO dto);

    SpecificationVO toSpecificationVO(Specification bo);

    List<SpecificationVO> toSpecificationVO(List<Specification> bo);

}
